package com.sheepone.distributor;

import com.sheepone.distributor.event.EventContext;

import java.util.List;

/**
 * @author Miss.杨
 * @description
 * @since 2024/3/23 - 22:42
 */
public class DefaultDistributor extends Distributor{
    public DefaultDistributor(String name, int size, List<DistributorLine> lines) {
        super(name, size, lines);
    }

    @Override
    public void distributeDelay(String targetStation, String targetTopic, EventContext context, long delaySeconds) {
        if(logger.isErrorEnabled()){
            logger.error("The Distributor {} does not support delayed distribute. " +
                    "If you want to use this feature, " +
                    "please configure 'distributorLine.enableDelay = true'", name);
        }
        throw new RuntimeException("The Distributor does not support delayed distribute");
    }
}
